package com.ferry.config;

import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.ferry.utils.IdGenerator;
import org.springframework.stereotype.Component;

import java.util.Random;

@Component
public class CustomerIdGenerator implements IdentifierGenerator {

    private Random random = new Random();

    @Override
    public Long nextId(Object entity) {
        // 填充自己的Id生成器，
        return random.nextLong(100000000) + 10000000;
    }
}
